#include <stdio.h>
//#include "other_list_function.h"
#include "polynomials.h"
int main(int argc, char const *argv[])
{
    /* code */
    const int length1 = 3;
    const int length2 = 2; 
    float coef_1[length1] = {2, 4, 5};
    int exp_1[length1] = {5, 4, 0};
    float coef_2[length2] = {3, 2};
    int exp_2[length2] = {5, 1};
    int* exp_3;
    float* coef_3;
    ptr_list p1;
    ptr_list p2;
    ptr_list p3;
    int i = 0;
    //create p1 and p2
    for(i = 0; i < length1; i++)
        printf("%f\n", coef_1[i]);

    p1 = create_ptr(length1, coef_1, exp_1);
    p2 = create_ptr(0, coef_3, exp_3);

    // print p1 and p2
    printPtrList(p1);
    printPtrList(p2);

    // print p1 add p2
    p3 = ptr_add(p1, p2);
    printPtrList(p3);

    // //print p1 multiply p2
    p3 = ptr_multiply(p1, p2);
    if (p3 != NULL)
    {
        printPtrList(p3);
    }
    
}



// int main(int argc, char const *argv[])
// {
// 	int a[3] = {3, 4, 5};
//     int b[5] = {1, 2, 3, 6, 7};
// 	list l1, l2, l3;
// 	l1 = createList(3, a);
//     l2 = createList(5, b);
// 	printList(l1);
//     printList(l2);
//     l3 = get_operation_or(l1, l2);
//     printList(l3);
//     deleteList(l3);

//     l3 = get_operation_and(l1, l2);
//     printList(l3);

//     deleteList(l1);
//     deleteList(l2);
//     deleteList(l3);
// }

/*
if (isEmpty(l))
        printf("the list is empty\n");
    else
        printf("the list is not empty\n");
    printf("list length is %d\n", getListLength(l));
    position p;
    p = find(4, l);
    insert(6, l, p);
    printf("list length is %d\n", getListLength(l));
    printList(l);

    deleteitem(4, l);
    printf("delete 4\n");
    printList(l);
    printf("list length is %d\n", getListLength(l));
    return 0;
*/